package com.xian.yoga.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * charge
 * @author 
 */
public class Charge implements Serializable {
    private Integer chargeId;

    private Integer studentId;

    private Date chargeDate;

    private BigDecimal chargeBalance;

    private String chargeMethod;

    private static final long serialVersionUID = 1L;

    public Integer getChargeId() {
        return chargeId;
    }

    public void setChargeId(Integer chargeId) {
        this.chargeId = chargeId;
    }

    public Integer getStudentId() {
        return studentId;
    }

    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    public Date getChargeDate() {
        return chargeDate;
    }

    public void setChargeDate(Date chargeDate) {
        this.chargeDate = chargeDate;
    }

    public BigDecimal getChargeBalance() {
        return chargeBalance;
    }

    public void setChargeBalance(BigDecimal chargeBalance) {
        this.chargeBalance = chargeBalance;
    }

    public String getChargeMethod() {
        return chargeMethod;
    }

    public void setChargeMethod(String chargeMethod) {
        this.chargeMethod = chargeMethod;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Charge other = (Charge) that;
        return (this.getChargeId() == null ? other.getChargeId() == null : this.getChargeId().equals(other.getChargeId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getChargeDate() == null ? other.getChargeDate() == null : this.getChargeDate().equals(other.getChargeDate()))
            && (this.getChargeBalance() == null ? other.getChargeBalance() == null : this.getChargeBalance().equals(other.getChargeBalance()))
            && (this.getChargeMethod() == null ? other.getChargeMethod() == null : this.getChargeMethod().equals(other.getChargeMethod()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getChargeId() == null) ? 0 : getChargeId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getChargeDate() == null) ? 0 : getChargeDate().hashCode());
        result = prime * result + ((getChargeBalance() == null) ? 0 : getChargeBalance().hashCode());
        result = prime * result + ((getChargeMethod() == null) ? 0 : getChargeMethod().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", chargeId=").append(chargeId);
        sb.append(", studentId=").append(studentId);
        sb.append(", chargeDate=").append(chargeDate);
        sb.append(", chargeBalance=").append(chargeBalance);
        sb.append(", chargeMethod=").append(chargeMethod);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}